<script >
import {reactive} from 'vue'
export default{
  setup(){
    const obj=reactive({age:20,name:'那么'})
    const changeobj =()=>{
      obj.age+=1
      obj.name=obj.name+'变'
    }
    return {obj,changeobj}
  }
}
</script>
<template>
 <p>年龄：{{obj.age}}  姓名:{{obj.name}}</p>
 <button @click="changeobj">改</button>
</template>
<style>
</style>